/**
 * 
 */
package com.gopay.common.constants.bank;


/**
 * @CuccPayInfo.java
 * @author Ryan
 * @2013-11-14 下午3:22:08  www.gopay.com.cn Inc.All rights reserved.
 */
public enum CuccPayQureyRespone {

    SUCCESS("SUCCESS","成功"),
    SYSTEM_ERROR("SYSTEM_ERROR","联通沃支付平台系统错误"),
    ILLEGAL_SIGN("ILLEGAL_SIGN","验证签名不正确"),
    ILLEGAL_SIGN_TYPE("ILLEGAL_SIGN_TYPE","签名类型不正确"),
    ILLEGAL_ARGUMENT("ILLEGAL_ARGUMENT","参数不正确"),
    ILLEGAL_MERCHANT_NO("ILLEGAL_MERCHANT_NO","商户号不存在"),
    ILLEGA_ORDER_NO("ILLEGA_ORDER_NO","订单号不存在"),
    HAS_NO_PRIVILEGE("HAS_NO_PRIVILEGE","没有权限"),
    ILLEGAL_ORIG_TRADE("ILLEGAL_ORIG_TRADE","原交易不存在"),
    REFUND_AMOUNT_TOO_LARGE("REFUND_AMOUNT_TOO_LARGE","退款金额大于原交易金额"),
    ENCRYPT_ERROR("ENCRYPT_ERROR","加密错误");
    
    private String key;
    public String value;

    CuccPayQureyRespone(String key, String value) {
        this.key = key;
        this.value = value;
    }

    // 普通方法
    public static String getName(String key) {
        for (CuccPayQureyRespone info : CuccPayQureyRespone.values()) {
            if (info.getKey().equals(key)) {
                return info.value;
            }
        }
        return "";
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * @return the key
     */
    public String getKey() {
        return key;
    }

    /**
     * @param key the key to set
     */
    public void setKey(String key) {
        this.key = key;
    }

    /**
     * @return the value
     */
    public String getValue() {
        return value;
    }

    /**
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }

}
